package com.cskaoyan.day2.collection._03_example;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;

/**
 * @author Common-zhou
 * @since 2023-02-28 15:52
 */
public class StudentList {

    public static Collection<Student> getStudentList() throws ParseException {
        Collection<Student> collection = new ArrayList<>();

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");

        collection.add(new Student("zs", 21, 200, simpleDateFormat.parse("2023-02-01")));
        collection.add(new Student("ls", 20, 300, simpleDateFormat.parse("2022-08-01")));
        collection.add(new Student("wu", 18, 250, simpleDateFormat.parse("2019-07-01")));
        collection.add(new Student("zl", 16, 320, simpleDateFormat.parse("2022-05-01")));
        collection.add(new Student("Java", 17, 360, simpleDateFormat.parse("2021-04-01")));
        collection.add(new Student("C++", 15, 380, simpleDateFormat.parse("2022-09-01")));
        collection.add(new Student("Python", 30, 200, simpleDateFormat.parse("2018-09-01")));

        return collection;
    }
}
